
import { request } from '@/utils/request';

// 查询公告列表
export const getPage = (params: any) => {
  return request.get({
    url: '/staff/web/userCenter/form/form/page.json',
    params
  })
}

// 查询公告详情
export const getById = (id: string) => {
  return request.get({
    url: '/staff/web/userCenter/form/form/getById.json?id=' + id
  })
}

// 查询公告详情
export const getByCode = (code: string) => {
  return request.get({
    url: '/staff/web/userCenter/form/form/getByCode.json?code=' + code
  })
}

// 修改公告
export const update = (data: any, ) => {
  console.log('up')

  return request.put({
    url: '/staff/web/userCenter/form/form/update.json',
    data
  })
}

// 删除公告
export const del = (id: string) => {
  return request.delete({
    url: '/staff/web/userCenter/form/form/del.json?id=' + id, data: [id, ], 
  })
}
